package com.xiaoxu.intranetweb.mybatisplusSzappdb.excelEntity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;


@Data
public class MonthReportData {
    @ExcelProperty("单位名称")
    private String company;

    @ExcelProperty("产品")
    private String product;

    @ExcelProperty("月累积量")
    private BigDecimal totalQuantity = BigDecimal.ZERO;

    @ExcelProperty("月累计销售额")
    private BigDecimal totalSales = BigDecimal.ZERO;

    // 为每一天定义数量、单价和金额字段
    @ExcelProperty(value = {"01", "数量"},index = 4)
    @ColumnWidth(15)
    private BigDecimal day1Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"01", "单价"}, index = 5)
    @ColumnWidth(15)
    private BigDecimal day1UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"01", "金额"}, index = 6)
    @ColumnWidth(15)
    private BigDecimal day1Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"02", "数量"}, index = 7)
    @ColumnWidth(15)
    private BigDecimal day2Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"02", "单价"}, index = 8)
    @ColumnWidth(15)
    private BigDecimal day2UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"02", "金额"}, index = 9)
    @ColumnWidth(15)
    private BigDecimal day2Amount= BigDecimal.ZERO;;

    // 依次添加其他天数的字段...
    @ExcelProperty(value = {"03", "数量"}, index = 10)
    @ColumnWidth(15)
    private BigDecimal day3Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value ={"03", "单价"}, index = 11)
    @ColumnWidth(15)
    private BigDecimal day3UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"03", "金额"}, index = 12)
    @ColumnWidth(15)
    private BigDecimal day3Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"04", "数量"}, index = 13)
    @ColumnWidth(15)
    private BigDecimal day4Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"04", "单价"}, index = 14)
    @ColumnWidth(15)
    private BigDecimal day4UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"04", "金额"}, index = 15)
    @ColumnWidth(15)
    private BigDecimal day4Amount= BigDecimal.ZERO;;

    @ExcelProperty(value ={"05", "数量"}, index = 16)
    @ColumnWidth(15)
    private BigDecimal day5Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"05", "单价"}, index = 17)
    @ColumnWidth(15)
    private BigDecimal day5UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"05", "金额"}, index = 18)
    @ColumnWidth(15)
    private BigDecimal day5Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"06", "数量"}, index = 19)
    @ColumnWidth(15)
    private BigDecimal day6Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"06", "单价"}, index = 20)
    @ColumnWidth(15)
    private BigDecimal day6UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"06", "金额"}, index = 21)
    @ColumnWidth(15)
    private BigDecimal day6Amount= BigDecimal.ZERO;;

    @ExcelProperty(value ={"07", "数量"}, index = 22)
    @ColumnWidth(15)
    private BigDecimal day7Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"07", "单价"}, index = 23)
    @ColumnWidth(15)
    private BigDecimal day7UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value ={"07", "金额"}, index = 24)
    @ColumnWidth(15)
    private BigDecimal day7Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"08", "数量"}, index = 25)
    @ColumnWidth(15)
    private BigDecimal day8Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"08", "单价"}, index = 26)
    @ColumnWidth(15)
    private BigDecimal day8UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"08", "金额"}, index = 27)
    @ColumnWidth(15)
    private BigDecimal day8Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"09", "数量"}, index = 28)
    @ColumnWidth(15)
    private BigDecimal day9Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"09", "单价"}, index = 29)
    @ColumnWidth(15)
    private BigDecimal day9UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"09", "金额"}, index = 30)
    @ColumnWidth(15)
    private BigDecimal day9Amount= BigDecimal.ZERO;;

    @ExcelProperty(value = {"10", "数量"}, index = 31)
    @ColumnWidth(15)
    private BigDecimal day10Quantity= BigDecimal.ZERO;;

    @ExcelProperty(value = {"10", "单价"}, index = 32)
    @ColumnWidth(15)
    private BigDecimal day10UnitPrice= BigDecimal.ZERO;;

    @ExcelProperty(value = {"10", "金额"}, index = 33)
    @ColumnWidth(15)
    private BigDecimal day10Amount= BigDecimal.ZERO;;

    // 第 11 天的数据
    @ExcelProperty(value = {"11", "数量"}, index = 34)
    @ColumnWidth(15)
    private BigDecimal day11Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"11", "单价"}, index = 35)
    @ColumnWidth(15)
    private BigDecimal day11UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"11", "金额"}, index = 36)
    @ColumnWidth(15)
    private BigDecimal day11Amount = BigDecimal.ZERO;

    // 第 12 天的数据
    @ExcelProperty(value = {"12", "数量"}, index = 37)
    @ColumnWidth(15)
    private BigDecimal day12Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"12", "单价"}, index = 38)
    @ColumnWidth(15)
    private BigDecimal day12UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"12", "金额"}, index = 39)
    @ColumnWidth(15)
    private BigDecimal day12Amount = BigDecimal.ZERO;

    // 第 13 天的数据
    @ExcelProperty(value = {"13", "数量"}, index = 40)
    @ColumnWidth(15)
    private BigDecimal day13Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"13", "单价"}, index = 41)
    @ColumnWidth(15)
    private BigDecimal day13UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"13", "金额"}, index = 42)
    @ColumnWidth(15)
    private BigDecimal day13Amount = BigDecimal.ZERO;

    // 第 14 天的数据
    @ExcelProperty(value = {"14", "数量"}, index = 43)
    @ColumnWidth(15)
    private BigDecimal day14Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"14", "单价"}, index = 44)
    @ColumnWidth(15)
    private BigDecimal day14UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"14", "金额"}, index = 45)
    @ColumnWidth(15)
    private BigDecimal day14Amount = BigDecimal.ZERO;

    // 第 15 天的数据
    @ExcelProperty(value = {"15", "数量"}, index = 46)
    @ColumnWidth(15)
    private BigDecimal day15Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"15", "单价"}, index = 47)
    @ColumnWidth(15)
    private BigDecimal day15UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"15", "金额"}, index = 48)
    @ColumnWidth(15)
    private BigDecimal day15Amount = BigDecimal.ZERO;

    // 第 16 天的数据
    @ExcelProperty(value = {"16", "数量"}, index = 49)
    @ColumnWidth(15)
    private BigDecimal day16Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"16", "单价"}, index = 50)
    @ColumnWidth(15)
    private BigDecimal day16UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"16", "金额"}, index = 51)
    @ColumnWidth(15)
    private BigDecimal day16Amount = BigDecimal.ZERO;

    // 第 17 天的数据
    @ExcelProperty(value = {"17", "数量"}, index = 52)
    @ColumnWidth(15)
    private BigDecimal day17Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"17", "单价"}, index = 53)
    @ColumnWidth(15)
    private BigDecimal day17UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"17", "金额"}, index = 54)
    @ColumnWidth(15)
    private BigDecimal day17Amount = BigDecimal.ZERO;

    // 第 18 天的数据
    @ExcelProperty(value = {"18", "数量"}, index = 55)
    @ColumnWidth(15)
    private BigDecimal day18Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"18", "单价"}, index = 56)
    @ColumnWidth(15)
    private BigDecimal day18UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"18", "金额"}, index = 57)
    @ColumnWidth(15)
    private BigDecimal day18Amount = BigDecimal.ZERO;

    // 第 19 天的数据
    @ExcelProperty(value = {"19", "数量"}, index = 58)
    @ColumnWidth(15)
    private BigDecimal day19Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"19", "单价"}, index = 59)
    @ColumnWidth(15)
    private BigDecimal day19UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"19", "金额"}, index = 60)
    @ColumnWidth(15)
    private BigDecimal day19Amount = BigDecimal.ZERO;

    // 第 20 天的数据
    @ExcelProperty(value = {"20", "数量"}, index = 61)
    @ColumnWidth(15)
    private BigDecimal day20Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"20", "单价"}, index = 62)
    @ColumnWidth(15)
    private BigDecimal day20UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"20", "金额"}, index = 63)
    @ColumnWidth(15)
    private BigDecimal day20Amount = BigDecimal.ZERO;

    // 第 21 天的数据
    @ExcelProperty(value = {"21", "数量"}, index = 64)
    @ColumnWidth(15)
    private BigDecimal day21Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"21", "单价"}, index = 65)
    @ColumnWidth(15)
    private BigDecimal day21UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"21", "金额"}, index = 66)
    @ColumnWidth(15)
    private BigDecimal day21Amount = BigDecimal.ZERO;

    // 第 22 天的数据
    @ExcelProperty(value = {"22", "数量"}, index = 67)
    @ColumnWidth(15)
    private BigDecimal day22Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"22", "单价"}, index = 68)
    @ColumnWidth(15)
    private BigDecimal day22UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"22", "金额"}, index = 69)
    @ColumnWidth(15)
    private BigDecimal day22Amount = BigDecimal.ZERO;

    // 第 23 天的数据
    @ExcelProperty(value = {"23", "数量"}, index = 70)
    @ColumnWidth(15)
    private BigDecimal day23Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"23", "单价"}, index = 71)
    @ColumnWidth(15)
    private BigDecimal day23UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"23", "金额"}, index = 72)
    @ColumnWidth(15)
    private BigDecimal day23Amount = BigDecimal.ZERO;

    // 第 24 天的数据
    @ExcelProperty(value = {"24", "数量"}, index = 73)
    @ColumnWidth(15)
    private BigDecimal day24Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"24", "单价"}, index = 74)
    @ColumnWidth(15)
    private BigDecimal day24UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"24", "金额"}, index = 75)
    @ColumnWidth(15)
    private BigDecimal day24Amount = BigDecimal.ZERO;

    // 第 25 天的数据
    @ExcelProperty(value = {"25", "数量"}, index = 76)
    @ColumnWidth(15)
    private BigDecimal day25Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"25", "单价"}, index = 77)
    @ColumnWidth(15)
    private BigDecimal day25UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"25", "金额"}, index = 78)
    @ColumnWidth(15)
    private BigDecimal day25Amount = BigDecimal.ZERO;

    // 第 26 天的数据
    @ExcelProperty(value = {"26", "数量"}, index = 79)
    @ColumnWidth(15)
    private BigDecimal day26Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"26", "单价"}, index = 80)
    @ColumnWidth(15)
    private BigDecimal day26UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"26", "金额"}, index = 81)
    @ColumnWidth(15)
    private BigDecimal day26Amount = BigDecimal.ZERO;

    // 第 27 天的数据
    @ExcelProperty(value = {"27", "数量"}, index = 82)
    @ColumnWidth(15)
    private BigDecimal day27Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"27", "单价"}, index = 83)
    @ColumnWidth(15)
    private BigDecimal day27UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"27", "金额"}, index = 84)
    @ColumnWidth(15)
    private BigDecimal day27Amount = BigDecimal.ZERO;

    // 第 28 天的数据
    @ExcelProperty(value = {"28", "数量"}, index = 85)
    @ColumnWidth(15)
    private BigDecimal day28Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"28", "单价"}, index = 86)
    @ColumnWidth(15)
    private BigDecimal day28UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"28", "金额"}, index = 87)
    @ColumnWidth(15)
    private BigDecimal day28Amount = BigDecimal.ZERO;

    // 第 29 天的数据
    @ExcelProperty(value = {"29", "数量"}, index = 88)
    @ColumnWidth(15)
    private BigDecimal day29Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"29", "单价"}, index = 89)
    @ColumnWidth(15)
    private BigDecimal day29UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"29", "金额"}, index = 90)
    @ColumnWidth(15)
    private BigDecimal day29Amount = BigDecimal.ZERO;

    // 第 30 天的数据
    @ExcelProperty(value = {"30", "数量"}, index = 91)
    @ColumnWidth(15)
    private BigDecimal day30Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"30", "单价"}, index = 92)
    @ColumnWidth(15)
    private BigDecimal day30UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"30", "金额"}, index = 93)
    @ColumnWidth(15)
    private BigDecimal day30Amount = BigDecimal.ZERO;

    // 第 31 天的数据
    @ExcelProperty(value = {"31", "数量"}, index = 94)
    @ColumnWidth(15)
    private BigDecimal day31Quantity = BigDecimal.ZERO;

    @ExcelProperty(value = {"31", "单价"}, index = 95)
    @ColumnWidth(15)
    private BigDecimal day31UnitPrice = BigDecimal.ZERO;

    @ExcelProperty(value = {"31", "金额"}, index = 96)
    @ColumnWidth(15)
    private BigDecimal day31Amount = BigDecimal.ZERO;

    // 默认构造函数
    public MonthReportData() {
        // 初始化所有字段为零
        for (int i = 1; i <= 31; i++) {
            setDayQuantity(i, BigDecimal.ZERO);
            setDayUnitPrice(i, BigDecimal.ZERO);
            setDayAmount(i, BigDecimal.ZERO);
        }
    }

    // 设置指定日期的数量
    public void setDayQuantity(int day, BigDecimal value) {
        switch (day) {
            case 1: this.day1Quantity = value; break;
            case 2: this.day2Quantity = value; break;
            case 3: this.day3Quantity = value; break;
            case 4: this.day4Quantity = value; break;
            case 5: this.day5Quantity = value; break;
            case 6: this.day6Quantity = value; break;
            case 7: this.day7Quantity = value; break;
            case 8: this.day8Quantity = value; break;
            case 9: this.day9Quantity = value; break;
            case 10: this.day10Quantity = value; break;
            case 11: this.day11Quantity = value; break;
            case 12: this.day12Quantity = value; break;
            case 13: this.day13Quantity = value; break;
            case 14: this.day14Quantity = value; break;
            case 15: this.day15Quantity = value; break;
            case 16: this.day16Quantity = value; break;
            case 17: this.day17Quantity = value; break;
            case 18: this.day18Quantity = value; break;
            case 19: this.day19Quantity = value; break;
            case 20: this.day20Quantity = value; break;
            case 21: this.day21Quantity = value; break;
            case 22: this.day22Quantity = value; break;
            case 23: this.day23Quantity = value; break;
            case 24: this.day24Quantity = value; break;
            case 25: this.day25Quantity = value; break;
            case 26: this.day26Quantity = value; break;
            case 27: this.day27Quantity = value; break;
            case 28: this.day28Quantity = value; break;
            case 29: this.day29Quantity = value; break;
            case 30: this.day30Quantity = value; break;
            case 31: this.day31Quantity = value; break;
            default: throw new IllegalArgumentException("Invalid day: " + day);
        }
    }
    public BigDecimal getDayQuantity(int day) {
        switch (day) {
            case 1: return this.day1Quantity;
            case 2: return this.day2Quantity;
            case 3: return this.day3Quantity;
            case 4: return this.day4Quantity;
            case 5: return this.day5Quantity;
            case 6: return this.day6Quantity;
            case 7: return this.day7Quantity;
            case 8: return this.day8Quantity;
            case 9: return this.day9Quantity;
            case 10: return this.day10Quantity;
            case 11: return this.day11Quantity;
            case 12: return this.day12Quantity;
            case 13: return this.day13Quantity;
            case 14: return this.day14Quantity;
            case 15: return this.day15Quantity;
            case 16: return this.day16Quantity;
            case 17: return this.day17Quantity;
            case 18: return this.day18Quantity;
            case 19: return this.day19Quantity;
            case 20: return this.day20Quantity;
            case 21: return this.day21Quantity;
            case 22: return this.day22Quantity;
            case 23: return this.day23Quantity;
            case 24: return this.day24Quantity;
            case 25: return this.day25Quantity;
            case 26: return this.day26Quantity;
            case 27: return this.day27Quantity;
            case 28: return this.day28Quantity;
            case 29: return this.day29Quantity;
            case 30: return this.day30Quantity;
            case 31: return this.day31Quantity;
            default: throw new IllegalArgumentException("Invalid day: " + day);
        }
    }
    // 设置指定日期的单价
    public void setDayUnitPrice(int day, BigDecimal value) {
        switch (day) {
            case 1: this.day1UnitPrice = value; break;
            case 2: this.day2UnitPrice = value; break;
            case 3: this.day3UnitPrice = value; break;
            case 4: this.day4UnitPrice = value; break;
            case 5: this.day5UnitPrice = value; break;
            case 6: this.day6UnitPrice = value; break;
            case 7: this.day7UnitPrice = value; break;
            case 8: this.day8UnitPrice = value; break;
            case 9: this.day9UnitPrice = value; break;
            case 10: this.day10UnitPrice = value; break;
            case 11: this.day11UnitPrice = value; break;
            case 12: this.day12UnitPrice = value; break;
            case 13: this.day13UnitPrice = value; break;
            case 14: this.day14UnitPrice = value; break;
            case 15: this.day15UnitPrice = value; break;
            case 16: this.day16UnitPrice = value; break;
            case 17: this.day17UnitPrice = value; break;
            case 18: this.day18UnitPrice = value; break;
            case 19: this.day19UnitPrice = value; break;
            case 20: this.day20UnitPrice = value; break;
            case 21: this.day21UnitPrice = value; break;
            case 22: this.day22UnitPrice = value; break;
            case 23: this.day23UnitPrice = value; break;
            case 24: this.day24UnitPrice = value; break;
            case 25: this.day25UnitPrice = value; break;
            case 26: this.day26UnitPrice = value; break;
            case 27: this.day27UnitPrice = value; break;
            case 28: this.day28UnitPrice = value; break;
            case 29: this.day29UnitPrice = value; break;
            case 30: this.day30UnitPrice = value; break;
            case 31: this.day31UnitPrice = value; break;
            default: throw new IllegalArgumentException("Invalid day: " + day);
        }
    }
    public BigDecimal getDayUnitPrice(int day) {
        switch (day) {
            case 1: return this.day1UnitPrice;
            case 2: return this.day2UnitPrice;
            case 3: return this.day3UnitPrice;
            case 4: return this.day4UnitPrice;
            case 5: return this.day5UnitPrice;
            case 6: return this.day6UnitPrice;
            case 7: return this.day7UnitPrice;
            case 8: return this.day8UnitPrice;
            case 9: return this.day9UnitPrice;
            case 10: return this.day10UnitPrice;
            case 11: return this.day11UnitPrice;
            case 12: return this.day12UnitPrice;
            case 13: return this.day13UnitPrice;
            case 14: return this.day14UnitPrice;
            case 15: return this.day15UnitPrice;
            case 16: return this.day16UnitPrice;
            case 17: return this.day17UnitPrice;
            case 18: return this.day18UnitPrice;
            case 19: return this.day19UnitPrice;
            case 20: return this.day20UnitPrice;
            case 21: return this.day21UnitPrice;
            case 22: return this.day22UnitPrice;
            case 23: return this.day23UnitPrice;
            case 24: return this.day24UnitPrice;
            case 25: return this.day25UnitPrice;
            case 26: return this.day26UnitPrice;
            case 27: return this.day27UnitPrice;
            case 28: return this.day28UnitPrice;
            case 29: return this.day29UnitPrice;
            case 30: return this.day30UnitPrice;
            case 31: return this.day31UnitPrice;
            default: throw new IllegalArgumentException("Invalid day: " + day);
        }
    }
    // 设置指定日期的金额
    public void setDayAmount(int day, BigDecimal value) {
        switch (day) {
            case 1: this.day1Amount = value; break;
            case 2: this.day2Amount = value; break;
            case 3: this.day3Amount = value; break;
            case 4: this.day4Amount = value; break;
            case 5: this.day5Amount = value; break;
            case 6: this.day6Amount = value; break;
            case 7: this.day7Amount = value; break;
            case 8: this.day8Amount = value; break;
            case 9: this.day9Amount = value; break;
            case 10: this.day10Amount = value; break;
            case 11: this.day11Amount = value; break;
            case 12: this.day12Amount = value; break;
            case 13: this.day13Amount = value; break;
            case 14: this.day14Amount = value; break;
            case 15: this.day15Amount = value; break;
            case 16: this.day16Amount = value; break;
            case 17: this.day17Amount = value; break;
            case 18: this.day18Amount = value; break;
            case 19: this.day19Amount = value; break;
            case 20: this.day20Amount = value; break;
            case 21: this.day21Amount = value; break;
            case 22: this.day22Amount = value; break;
            case 23: this.day23Amount = value; break;
            case 24: this.day24Amount = value; break;
            case 25: this.day25Amount = value; break;
            case 26: this.day26Amount = value; break;
            case 27: this.day27Amount = value; break;
            case 28: this.day28Amount = value; break;
            case 29: this.day29Amount = value; break;
            case 30: this.day30Amount = value; break;
            case 31: this.day31Amount = value; break;
            default: throw new IllegalArgumentException("Invalid day: " + day);
        }
    }

    public BigDecimal getDayAmount(int day) {
        switch (day) {
            case 1:
                return this.day1Amount;
            case 2:
                return this.day2Amount;
            case 3:
                return this.day3Amount;
            case 4:
                return this.day4Amount;
            case 5:
                return this.day5Amount;
            case 6:
                return this.day6Amount;
            case 7:
                return this.day7Amount;
            case 8:
                return this.day8Amount;
            case 9:
                return this.day9Amount;
            case 10:
                return this.day10Amount;
            case 11:
                return this.day11Amount;
            case 12:
                return this.day12Amount;
            case 13:
                return this.day13Amount;
            case 14:
                return this.day14Amount;
            case 15:
                return this.day15Amount;
            case 16:
                return this.day16Amount;
            case 17:
                return this.day17Amount;
            case 18:
                return this.day18Amount;
            case 19:
                return this.day19Amount;
            case 20:
                return this.day20Amount;
            case 21:
                return this.day21Amount;
            case 22:
                return this.day22Amount;
            case 23:
                return this.day23Amount;
            case 24:
                return this.day24Amount;
            case 25:
                return this.day25Amount;
            case 26:
                return this.day26Amount;
            case 27:
                return this.day27Amount;
            case 28:
                return this.day28Amount;
            case 29:
                return this.day29Amount;
            case 30:
                return this.day30Amount;
            case 31:
                return this.day31Amount;
            default:
                throw new IllegalArgumentException("Invalid day: " + day);
        }
    }
    // 设置指定日期的数量


    // 使用反射设置字段值
    private static void setFieldValue(Object obj, String fieldName, Object value) {
        try {
            Field field = obj.getClass().getDeclaredField(fieldName);
            field.setAccessible(true);
            field.set(obj, value);
        } catch (NoSuchFieldException | IllegalAccessException e) {
            throw new IllegalArgumentException("Invalid field: " + fieldName, e);
        }
    }
}